package com.bitoon.basketdudes.web.jpa;

import javax.servlet.*;

public class PersistenceAppListener implements ServletContextListener {

  public void contextInitialized(ServletContextEvent evt) {
  }

  public void contextDestroyed(ServletContextEvent evt) {
    String catalogos[] = {"jpa_basket"};

    for (int i=0; i<catalogos.length; i++) {
        PersistenceManager.getInstance().closeEntityManagerFactory(catalogos[i]);
    }
  }
}